package com.lvwenna.userserver.controller;

import com.lvwenna.userserver.DTO.LoginParamsDTO;
import com.lvwenna.userserver.VO.UserInfoVO;
import com.lvwenna.userserver.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {


    @Autowired
    private LoginService loginService;

     @PostMapping("/login")
    public UserInfoVO login(  @RequestBody LoginParamsDTO dto){
         UserInfoVO  userInfoVO = loginService.login(dto);
         return userInfoVO;
    }


}